import { Controller, LoopType } from "./controller";

interface IOptions {
    width: number
    heigth: number
    url: string
    loop?: LoopType
    speed?: number
}

class AlphaVideo extends Controller {
    private video: HTMLVideoElement

    constructor(options: IOptions) {
        super();

        if (options.loop != null) {
            this.setLoop(options.loop);
        }
        if (options.speed != null) {
            this.setSpeed(options.speed);
        }

        this.loadVideo(options);
    }

    loadVideo(options: IOptions) {

    }

    async start() {

    }
    stop(): this {
    }
    pause(): this {
    }
    gotoAndPlay(value: number): this {
    }
    gotoAndStop(value: number): this {
    }

    playSegments(segment: [number, (number | undefined)?], loop?: number | boolean, speed?: number): this {
    }

}

export { AlphaVideo }